<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app">
        <h1>{{info}}</h1>
        <button v-on:click="fn">点击我</button>
        <!--简写-->
        <button @click="fn">点击我2</button>
    </div>

    <script>
        const vm = {
            //数据模型
            data() {
                return {
                    info: "伟大的中国共产党"
                }
            },
            //方法
            methods: {
                fn() {
                    alert(123)
                }
            },
        }


        Vue.createApp(vm).mount('#app');
    </script>
</body>
</html>